const tags = {
    name: "theaters",
    description: "放映厅管理模块",
};

const schemas = {
    // 获取当前页面的条件的数据结构
    ArrayOfTheaters: {
        properties: {
            total: {
                type: "number",
                description: "总数",
            },
            maxPage: {
                type: "number",
                description: "总页数",
            },
            rows: {
                type: "array",
                description: "排片当页数据",
                items: {
                    $ref: "#/components/schemas/students",
                }
            }
        },
        properties:{
            total: {
                type: "number",
                description: "总数",
            },
        }
    },

};

const paths = {
    "/schedules/get": {
        get: {
            tags: ["schedules"],
            summary: "获取排片当页数据信息",
            description: "根据传入的当前页和每页显示条数获取当页的排片数据", // 具体描述
            consumes: ["application/json"],
            // parameters 请求参数
            parameters: [
                {
                    name: "curPage",
                    in: "query",    //get类型的参数在query中获取
                    schema: {
                        type: "integer",   //integer 整数
                        default: 1,
                    },
                    required: true,  //必填
                    description: "当前⻚码",
                },
                {
                    name: "eachPage",
                    in: "query",
                    schema: {
                        type: "integer",
                        default: 1,
                    },
                    required: true,
                    description: "每⻚显示条数",
                },
            ],
            responses: {
                200: {
                    description: "操作成功",
                    content: {
                        "application/json": {
                            schema: {
                                $ref: "#/components/schemas/ArrayOfSchedules",
                            },
                        },
                    },
                },
                404: {
                    description: "找不到资源",
                },
            },
        },
    },

}
